<jsp:include page="plantilla1.jsp" />
<%@page import="java.util.*"%>
<%@page import="studio7i.negocio.*"%>
<%@page import="studio7i.modelo.*"%>

<center>

<%
Reserva reserva = (Reserva)request.getAttribute("reserva");
%> 

<b align="left">Detalle de Reserva</b>
  <table width="*" border="0">
    <tr>
      <td align="right">Id Reserva:</td>
      <td align="left"><% out.print(reserva.getIdReserva()); %></td>
    </tr>
    <tr>
      <td align="right">Sala:</td>
      <td align="left"><% out.print(reserva.getSala().getCaracteristicas()); %></td>
    </tr>
    <tr>
      <td align="right">Usuario:</td>
      <td align="left"><% out.print(reserva.getUsuario().getNombres()); %></td>
    </tr>
    <tr>
      <td align="right">Fecha:</td>
      <td align="left"><% out.print(reserva.getFechaReserva()); %></td>
    </tr>
    <tr>
      <td align="right">Hora Inicio:</td>
      <td align="left"><% out.print(reserva.getHoraInicio()); %></td>
    </tr>
    <tr>
      <td align="right">Hora Fin:</td>
      <td align="left"><% out.print(reserva.getHoraFin()); %></td>
    </tr>
  </table>

<table width="*" border="1" cellspacing="2" cellpadding="2">
<tr>
<th colspan="5">Instrumentos</th>
</tr>
<tr>
<th>Id</th>
<th>Nombre</th>
<th>Modelo</th>
<th>Caracteristicas</th>
<th>Precio</th>
</tr>
<%
Collection<Instrumento> arreglo = (ArrayList<Instrumento>)reserva.getInstrumentos();
if(arreglo != null) { 
int i = 1;
for(Instrumento x : arreglo) {
%>  
  <tr>
    <td><% out.print(x.getIdInstrumento()); %></td>
    <td><% out.print(x.getNombre()); %></td>
    <td><% out.print(x.getModelo()); %></td>
    <td><% out.print(x.getCaracteristicas()); %></td>
    <td><% out.print(x.getPrecio()); %></td>
  </tr>
<% }
  } %>
</table>
<p></p>

<table width="*" border="1" cellspacing="2" cellpadding="2">
<tr>
<th colspan="4">Servicios</th>
</tr>
<tr>
<th>Id</th>
<th>Nombre</th>
<th>Caracteristicas</th>
<th>Precio</th>
</tr>
<%
Collection<Servicio> arregloS = (ArrayList<Servicio>)reserva.getServicios();
if(arreglo != null) { 
int i = 1;
for(Servicio x : arregloS) {
%>  
  <tr>
    <td><% out.print(x.getIdServicio()); %></td>
    <td><% out.print(x.getNombre()); %></td>
    <td><% out.print(x.getCaracteristicas()); %></td>
    <td><% out.print(x.getPrecio()); %></td>
  </tr>
<% }
  } %>
</table>

</center>

<jsp:include page="plantilla2.jsp" />